//
//  MLSegmentBarConfig.m
//  MLSegmentBar
//
//  Created by dreamforstar on 2018/4/22.
//  Copyright © 2018年 com.jiankeyan. All rights reserved.
//

#import "MLSegmentBarConfig.h"

@implementation MLSegmentBarConfig

+(instancetype)defaultConfig {
    MLSegmentBarConfig *config = [[MLSegmentBarConfig alloc] init];
    config.segmentBarBackColor = [UIColor redColor];
    config.nomalColor = [UIColor orangeColor];
    config.selectColor = [UIColor greenColor];
    config.nomalColor = [UIColor orangeColor];
    config.titleFont = [UIFont systemFontOfSize:15];
  
    config.indactorColor = [UIColor greenColor];
    config.indactorExtWidth = 2;
    config.indactorHeight = 1;

    return config;
}



-(MLSegmentBarConfig *(^)(UIColor *))itemNC {
    return ^(UIColor *color){
        self.nomalColor = color;
        return  self;
    };
}
-(MLSegmentBarConfig *(^)(UIColor *))itemSC {
    return ^(UIColor *color) {
        self.selectColor = color;
        return self;
    };
}
-(MLSegmentBarConfig *(^)(UIColor *))segmentBC {
    return ^(UIColor *color) {
        self.segmentBarBackColor = color;
        return self;
    };
}

-(MLSegmentBarConfig *(^)(UIFont *))titleFS {
    return ^(UIFont *font) {
        self.titleFont = font;
        return self;
        
    };
}

- (MLSegmentBarConfig *(^)(UIColor *))indactorC {
    return ^(UIColor *color) {
        self.indactorColor = color;
        return self;
    };
}
-(MLSegmentBarConfig *(^)(CGFloat))indExtW {
    return ^(CGFloat width) {
        self.indactorExtWidth = width;
        return self;
        
    };
}
-(MLSegmentBarConfig *(^)(CGFloat))indHeight {
    return ^(CGFloat height) {
        self.indactorHeight = height;
        return self;
        
    };
}



@end
